package foo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public final class Main {

	public static void main(String[] args) {

		ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");

		DemoDaoImpl dao = (DemoDaoImpl) ctx.getBean("demoDao");
		dao.run2();

		dao = new DemoDaoImpl();
		dao.run();
	}
}